package com.zhilianbao.leyaogo.model.response.category;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * 商品列表javaBean
 * Created by gyt on 2016/11/21
 */
public class GoodsInfo implements Parcelable {

    /*goodsId (integer, optional): 主键 ,
    supplierId (integer, optional): 供应商ID ,
    shopId (integer, optional): 所属店铺ID ,
    classifyId (integer, optional): 所属商品分类 0 与分类无关 对应叶子节点 ,
    customClassifyId (integer, optional): 所属店铺自定义分类 0 与分类无关 对应叶子节点 ,
    brandId (integer, optional): 商品所属品牌 0 品牌无关 ,
    goodsClassify (integer, optional): 商品类型 0 实物商品 1 虚拟商品 2 电子卡券 ,
    goodsType (integer, optional): 商品类型 0 SPU商品 1 SKU商品 2 组合商品 ,
    goodsSn (string, optional): 商品编码 店铺唯一 ,
    goodsName (string, optional): 商品名称 ,
    goodsFullName (string, optional): 商品全名 ,
    goodsPic (string, optional): 商品图片 ,
    goodsDesc (string, optional): 商品简介 ,
    unit (string, optional): 销售单位 ,
    stockType (integer, optional): 库存类型 0 无限制 1 SPU独立库存 2 SKU共享库存 3 SKU独立库存 ,
    stockNumber (integer, optional): 库存数量 1 SPU独立库存 2 SKU共享库存 设置 ,
    stockWarn (integer, optional): 库存提醒设置数量 ,
    getmPrice (number, optional): 市场价 ,
    stockStatus (integer, optional): 库存状态 0库存充足 1库存不足 2库存紧张 ,
    price (number, optional): 销售价 ,
    limitNumber (integer, optional): 限购数量 0 表示无限制 ,
    sortIndex (integer, optional): 排序 ,
    isHot (integer, optional): 是否推荐商品 0 否 1 是 ,
    enshrineNumber (integer, optional): 商品关注数量 ,
    saleNumber (integer, optional): 商品销售数量 ,
    voucherNumber (integer, optional): 商品评论数量 ,
    saleTimeType (integer, optional): 开售时间 0 立即开售 1 定时开售 ,
    saleDtm (string, optional): 开售时间 ,
    goodsSign (string, optional): 商品标签 ,
    comments (string, optional): 备注 ,
    isEnshrine (integer, optional): 收藏状态 0 无收藏 1收藏 ,
    goodsSkuId (integer, optional): 主键 SKU ID ,
    goodsSkuName (string, optional): 商品SKU名称 ,
    goodsSkuFullName (string, optional): 商品SKU全名称 ,
    itemIds (string, optional): 对应item编号 逗号隔开 ,
    itemVals (string, optional): 对应item值 逗号隔开 ,
    skuMPrice (number, optional): 市场价 ,
    skuPrice (number, optional): 销售价 ,
    skuStockNumber (integer, optional): 库存数量 3 SKU独立库存 设置 ,
    skuSaleNumber (integer, optional): 销售数量 ,
    skuJson (string, optional): 不用关心该字段 ,
    sku (Array[GoodsSkuResponse], optional): sku列表 ,
    skuMap (Array[GoodsSkuMapResponse], optional): sku属性列表 ,
    activitySign (string, optional): 活动标签
}GoodsSkuResponse {
        goodsSkuId (integer, optional): 主键 SKU ID ,
        goodsId (integer, optional): 对应商品编号 ,
        goodsSn (string, optional): SKU商品编码 店铺唯一 ,
        goodsSkuName (string, optional): 商品SKU名称 ,
        goodsSkuFullName (string, optional): 商品SKU全名称 ,
        itemIds (string, optional): 对应item编号 逗号隔开 ,
        itemVals (string, optional): 对应item值 逗号隔开 ,
        getmPrice (number, optional): 市场价 ,
        price (number, optional): 销售价 ,
        stockNumber (integer, optional): 库存数量 3 SKU独立库存 设置 ,
        saleNumber (integer, optional): 销售数量 ,
        statusCode (integer, optional): 状态 0 下架 1 上架 ,
        deleteFlag (integer, optional): 删除状态 0 正常 1 删除 ,
        stockStatus (integer, optional): 库存状态 0库存充足 1库存不足 2库存紧张 ,
        comments (string, optional): 备注
        }GoodsSkuMapResponse {
        goodsSkuMapId (integer, optional): 主键 SKU商品对应SKU属性编号 ,
        goodsId (integer, optional): 商品编号 ,
        skuId (integer, optional): 对应SUK编号 ,
        skuName (string, optional): SKU属性名 ,
        comments (string, optional): 备注 ,
        strVal1 (string, optional): 字符预留1 不用关心 ,
        goodsSkuMapItemResponse (Array[GoodsSkuMapItemResponse], optional)
        }GoodsSkuMapItemResponse {
        goodsSkuMapItemId (integer, optional): 主键 SKU商品对应SKU属性属性项编号 ,
        goodsSkuMapId (integer, optional): 所属商品SKU属性编号 ,
        skuId (integer, optional): 对应系统SKU编号 ,
        itemId (integer, optional): 对应系统SKU属性项编号 ,
        itemName (string, optional): 属性值 ,
        comments (string, optional): 备注
        }*/

    private int    goodsId;
    private int    supplierId;
    private int    shopId;
    private int    classifyId;
    private int    customClassifyId;
    private int    brandId;
    private int    goodsClassify;
    private int    goodsType;
    private String goodsSn;
    private String goodsName;
    private String goodsFullName;
    private String goodsPic;
    private String goodsDesc;
    private String unit;
    private int    stockType;
    private int    stockNumber;
    private int    stockWarn;
    private int    getmPrice;
    private int    stockStatus;
    private double price;
    private double mPrice;
    private int    limitNumber;
    private int    sortIndex;
    private int    isHot;
    private int    enshrineNumber;
    private int    saleNumber;
    private int    voucherNumber;
    private int    saleTimeType;
    private String saleDtm;
    private String goodsSign;// 一般商品的商品标签
    private String comments;
    private int    isEnshrine;
    private int    goodsSkuId;
    private String goodsSkuName;
    private String goodsSkuFullName;
    private String itemIds;
    private String itemVals;
    private double skuMPrice;
    private double skuPrice;
    private int    skuStockNumber;
    private int    skuSaleNumber;
    private String skuJson;
    private int    selectedSkuId;
    private String goodsActivitySign;//专题活动的商品标签
    private String activitySign;


    /**
     * goodsSkuId : 0
     * goodsId : 0
     * goodsSn : string
     * goodsSkuName : string
     * goodsSkuFullName : string
     * itemIds : string
     * itemVals : string
     * getmPrice : 0
     * price : 0
     * stockNumber : 0
     * saleNumber : 0
     * statusCode : 0
     * deleteFlag : 0
     * stockStatus : 0
     * comments : string
     */

    private List<SkuEntity>    sku;
    /**
     * goodsSkuMapId : 0
     * goodsId : 0
     * skuId : 0
     * skuName : string
     * comments : string
     * strVal1 : string
     * goodsSkuMapItemResponse : [{"goodsSkuMapItemId":0,"goodsSkuMapId":0,"skuId":0,"itemId":0,"itemName":"string","comments":"string"}]
     */

    private List<SkuMapEntity> skuMap;

    /**
     * activitySign : string
     */


    protected GoodsInfo(Parcel in) {
        goodsId = in.readInt();
        supplierId = in.readInt();
        shopId = in.readInt();
        classifyId = in.readInt();
        customClassifyId = in.readInt();
        brandId = in.readInt();
        goodsClassify = in.readInt();
        goodsType = in.readInt();
        goodsSn = in.readString();
        goodsName = in.readString();
        goodsFullName = in.readString();
        goodsPic = in.readString();
        goodsDesc = in.readString();
        unit = in.readString();
        stockType = in.readInt();
        stockNumber = in.readInt();
        stockWarn = in.readInt();
        getmPrice = in.readInt();
        stockStatus = in.readInt();
        price = in.readDouble();
        mPrice = in.readDouble();
        limitNumber = in.readInt();
        sortIndex = in.readInt();
        isHot = in.readInt();
        enshrineNumber = in.readInt();
        saleNumber = in.readInt();
        voucherNumber = in.readInt();
        saleTimeType = in.readInt();
        saleDtm = in.readString();
        goodsSign = in.readString();
        comments = in.readString();
        isEnshrine = in.readInt();
        goodsSkuId = in.readInt();
        goodsSkuName = in.readString();
        goodsSkuFullName = in.readString();
        itemIds = in.readString();
        itemVals = in.readString();
        skuMPrice = in.readDouble();
        skuPrice = in.readDouble();
        skuStockNumber = in.readInt();
        skuSaleNumber = in.readInt();
        skuJson = in.readString();
        selectedSkuId = in.readInt();
    }

    public static final Creator<GoodsInfo> CREATOR = new Creator<GoodsInfo>() {
        @Override
        public GoodsInfo createFromParcel(Parcel in) {
            return new GoodsInfo(in);
        }

        @Override
        public GoodsInfo[] newArray(int size) {
            return new GoodsInfo[size];
        }
    };

    public int getSelectedSkuId() {
        return selectedSkuId;
    }

    public void setSelectedSkuId(int selectedSkuId) {
        this.selectedSkuId = selectedSkuId;
    }

    public int getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(int goodsId) {
        this.goodsId = goodsId;
    }

    public int getSupplierId() {
        return supplierId;
    }

    public void setSupplierId(int supplierId) {
        this.supplierId = supplierId;
    }

    public int getShopId() {
        return shopId;
    }

    public void setShopId(int shopId) {
        this.shopId = shopId;
    }

    public int getClassifyId() {
        return classifyId;
    }

    public void setClassifyId(int classifyId) {
        this.classifyId = classifyId;
    }

    public int getCustomClassifyId() {
        return customClassifyId;
    }

    public void setCustomClassifyId(int customClassifyId) {
        this.customClassifyId = customClassifyId;
    }

    public int getBrandId() {
        return brandId;
    }

    public void setBrandId(int brandId) {
        this.brandId = brandId;
    }

    public int getGoodsClassify() {
        return goodsClassify;
    }

    public void setGoodsClassify(int goodsClassify) {
        this.goodsClassify = goodsClassify;
    }

    public int getGoodsType() {
        return goodsType;
    }

    public void setGoodsType(int goodsType) {
        this.goodsType = goodsType;
    }

    public String getGoodsSn() {
        return goodsSn;
    }

    public void setGoodsSn(String goodsSn) {
        this.goodsSn = goodsSn;
    }

    public String getGoodsName() {
        return goodsName;
    }

    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }

    public String getGoodsFullName() {
        return goodsFullName;
    }

    public void setGoodsFullName(String goodsFullName) {
        this.goodsFullName = goodsFullName;
    }

    public String getGoodsPic() {
        return goodsPic;
    }

    public void setGoodsPic(String goodsPic) {
        this.goodsPic = goodsPic;
    }

    public String getGoodsDesc() {
        return goodsDesc;
    }

    public void setGoodsDesc(String goodsDesc) {
        this.goodsDesc = goodsDesc;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public int getStockType() {
        return stockType;
    }

    public void setStockType(int stockType) {
        this.stockType = stockType;
    }

    public int getStockNumber() {
        return stockNumber;
    }

    public void setStockNumber(int stockNumber) {
        this.stockNumber = stockNumber;
    }

    public int getStockWarn() {
        return stockWarn;
    }

    public void setStockWarn(int stockWarn) {
        this.stockWarn = stockWarn;
    }

    public int getGetmPrice() {
        return getmPrice;
    }

    public void setGetmPrice(int getmPrice) {
        this.getmPrice = getmPrice;
    }

    public int getStockStatus() {
        return stockStatus;
    }

    public void setStockStatus(int stockStatus) {
        this.stockStatus = stockStatus;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public int getLimitNumber() {
        return limitNumber;
    }

    public void setLimitNumber(int limitNumber) {
        this.limitNumber = limitNumber;
    }

    public int getSortIndex() {
        return sortIndex;
    }

    public void setSortIndex(int sortIndex) {
        this.sortIndex = sortIndex;
    }

    public int getIsHot() {
        return isHot;
    }

    public void setIsHot(int isHot) {
        this.isHot = isHot;
    }

    public int getEnshrineNumber() {
        return enshrineNumber;
    }

    public void setEnshrineNumber(int enshrineNumber) {
        this.enshrineNumber = enshrineNumber;
    }

    public int getSaleNumber() {
        return saleNumber;
    }

    public void setSaleNumber(int saleNumber) {
        this.saleNumber = saleNumber;
    }

    public int getVoucherNumber() {
        return voucherNumber;
    }

    public void setVoucherNumber(int voucherNumber) {
        this.voucherNumber = voucherNumber;
    }

    public int getSaleTimeType() {
        return saleTimeType;
    }

    public void setSaleTimeType(int saleTimeType) {
        this.saleTimeType = saleTimeType;
    }

    public String getSaleDtm() {
        return saleDtm;
    }

    public void setSaleDtm(String saleDtm) {
        this.saleDtm = saleDtm;
    }

    public String getGoodsSign() {
        return goodsSign;
    }

    public void setGoodsSign(String goodsSign) {
        this.goodsSign = goodsSign;
    }

    public String getComments() {
        return comments;
    }

    public void setComments(String comments) {
        this.comments = comments;
    }

    public int getIsEnshrine() {
        return isEnshrine;
    }

    public void setIsEnshrine(int isEnshrine) {
        this.isEnshrine = isEnshrine;
    }

    public int getGoodsSkuId() {
        return goodsSkuId;
    }

    public void setGoodsSkuId(int goodsSkuId) {
        this.goodsSkuId = goodsSkuId;
    }

    public String getGoodsSkuName() {
        return goodsSkuName;
    }

    public void setGoodsSkuName(String goodsSkuName) {
        this.goodsSkuName = goodsSkuName;
    }

    public String getGoodsSkuFullName() {
        return goodsSkuFullName;
    }

    public void setGoodsSkuFullName(String goodsSkuFullName) {
        this.goodsSkuFullName = goodsSkuFullName;
    }

    public String getItemIds() {
        return itemIds;
    }

    public void setItemIds(String itemIds) {
        this.itemIds = itemIds;
    }

    public String getItemVals() {
        return itemVals;
    }

    public void setItemVals(String itemVals) {
        this.itemVals = itemVals;
    }

    public double getSkuMPrice() {
        return skuMPrice;
    }

    public void setSkuMPrice(double skuMPrice) {
        this.skuMPrice = skuMPrice;
    }

    public double getSkuPrice() {
        return skuPrice;
    }

    public void setSkuPrice(double skuPrice) {
        this.skuPrice = skuPrice;
    }

    public int getSkuStockNumber() {
        return skuStockNumber;
    }

    public void setSkuStockNumber(int skuStockNumber) {
        this.skuStockNumber = skuStockNumber;
    }

    public int getSkuSaleNumber() {
        return skuSaleNumber;
    }

    public void setSkuSaleNumber(int skuSaleNumber) {
        this.skuSaleNumber = skuSaleNumber;
    }

    public String getSkuJson() {
        return skuJson;
    }

    public void setSkuJson(String skuJson) {
        this.skuJson = skuJson;
    }

    public List<SkuEntity> getSku() {
        return sku;
    }

    public void setSku(List<SkuEntity> sku) {
        this.sku = sku;
    }

    public List<SkuMapEntity> getSkuMap() {
        return skuMap;
    }

    public void setSkuMap(List<SkuMapEntity> skuMap) {
        this.skuMap = skuMap;
    }

    public double getMPrice() {
        return mPrice;
    }

    public void setMPrice(double mPrice) {
        this.mPrice = mPrice;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(goodsId);
        dest.writeInt(supplierId);
        dest.writeInt(shopId);
        dest.writeInt(classifyId);
        dest.writeInt(customClassifyId);
        dest.writeInt(brandId);
        dest.writeInt(goodsClassify);
        dest.writeInt(goodsType);
        dest.writeString(goodsSn);
        dest.writeString(goodsName);
        dest.writeString(goodsFullName);
        dest.writeString(goodsPic);
        dest.writeString(goodsDesc);
        dest.writeString(unit);
        dest.writeInt(stockType);
        dest.writeInt(stockNumber);
        dest.writeInt(stockWarn);
        dest.writeInt(getmPrice);
        dest.writeInt(stockStatus);
        dest.writeDouble(price);
        dest.writeDouble(mPrice);
        dest.writeInt(limitNumber);
        dest.writeInt(sortIndex);
        dest.writeInt(isHot);
        dest.writeInt(enshrineNumber);
        dest.writeInt(saleNumber);
        dest.writeInt(voucherNumber);
        dest.writeInt(saleTimeType);
        dest.writeString(saleDtm);
        dest.writeString(goodsSign);
        dest.writeString(comments);
        dest.writeInt(isEnshrine);
        dest.writeInt(goodsSkuId);
        dest.writeString(goodsSkuName);
        dest.writeString(goodsSkuFullName);
        dest.writeString(itemIds);
        dest.writeString(itemVals);
        dest.writeDouble(skuMPrice);
        dest.writeDouble(skuPrice);
        dest.writeInt(skuStockNumber);
        dest.writeInt(skuSaleNumber);
        dest.writeString(skuJson);
        dest.writeInt(selectedSkuId);
    }

    public String getActivitySign() {
        return activitySign;
    }

    public void setActivitySign(String activitySign) {
        this.activitySign = activitySign;
    }

    public String getGoodsActivitySign() {
        return goodsActivitySign;
    }

    public void setGoodsActivitySign(String goodsActivitySign) {
        this.goodsActivitySign = goodsActivitySign;
    }
}
